Add TS script to read and process broadcastable messages from JSON in examples/ts #6892
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a comprehensive TypeScript script that demonstrates how to process BIP322 broadcastable messages from JSON files containing airdrop claim data. The implementation provides a clear usage example for BitGo's BIP322 utilities as requested.
New Files Added
examples/ts/process-bip322-claims.tsA complete CLI script that:
broadcastableMessagefieldsdeserializeBIP322BroadcastableMessage()generateBIP322MessageListAndVerifyFromMessageBroadcastable()btcandtbtc4coin typesexamples/ts/sample-claims.jsonSample JSON data demonstrating the expected structure:
{ "status": "success", "claims": [ { "id": "claim-001", "broadcastableMessage": "7b227478486578223a22303130323033222c226d657373616765496e666f223a5b7b2261646472657373223a22736f6d6541646472657373222c226d657373616765223a22736f6d654d657373616765222c227075626b657973223a5b227075626b657931222c227075626b657932225d2c2273637269707454797065223a2270327368227d5d7d", ... } ], "count": 1, "pagination": { "limit": 100, "hasNext": false } }examples/ts/BIP322_CLAIMS_README.mdComprehensive documentation covering:
Key Features
Usage Example
cd examples/ts npx tsx process-bip322-claims.ts sample-claims.json btcThe script demonstrates the complete workflow from reading JSON claim data to extracting verified address/message pairs, providing developers with a clear understanding of how to process airdrop claim data using BitGo's BIP322 utilities.
Fixes #6891.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
download.cypress.io/usr/local/bin/node index.js --exec install(dns block)https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/722234/chrome-linux.zip/usr/local/bin/node install.js(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.